﻿namespace Reactor.Messaging.Attributes
{
    /// <summary>
    /// Attribute used to mark a MessageHandler for handling messages on the point-to-point channel specified in this attribute. 
    /// If no channel name is provided in the attribute, the default channel for the currently running process is used.
    /// </summary>
    public class PointToPointChannelAttribute : DestinationInformationAttribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PointToPointChannelAttribute"/> class.
        /// </summary>
        public PointToPointChannelAttribute() {}

        /// <summary>
        /// Initializes a new instance of the <see cref="PointToPointChannelAttribute"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        public PointToPointChannelAttribute(string name)
        {
            Name = name;
        }

        /// <summary>
        /// Gets or sets the name of the queue.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }
    }
}
